<template>
  <div>
    <h1>查看Vue的过渡动画效果-使用第三方库 animate.css</h1>
    <button @click="isShow = !isShow">控制元素的显示和隐藏</button>
    <!-- 左进右出      fadeInLeft         fadeOutRight -->
    <transition name="three"
      enter-active-class="animate__fadeInLeft"
      leave-active-class="animate__fadeOutRight"
    >
      <div v-show="isShow" class="animate__animated text">
        我是第三方动画元素
      </div>
    </transition>
  </div>
</template>

<script>
export default {
  name: "AnimOther",
  data() {
    return {
      isShow: true,
    };
  },
};
</script>

<style scoped>
.text {
  width: 200px;
  height: 50px;
  background: yellowgreen;
  font-size: 18px;
  text-align: center;
  line-height: 50px;
}
</style>